import { createRouter, createWebHistory } from 'vue-router'

const routers = [
  {
    path: '/binary',
    name: 'Binary',
    component: async () => await import('@/views/Binary.vue'),
    meta: {
      visited: false
    }
  },
  {
    path: '/date',
    name: 'Date',
    component: async () => await import('@/views/Date.vue')
  },
  {
    path: '/test',
    name: 'Test',
    component: async () => await import('@/views/Test.vue')
  },
  {
    path: '/:pathMatch(.*)*',
    component: async () => await import('@/views/NotFound.vue')
  }
]

if (process.env.NODE_ENV === 'development') {
  routers.push({
    path: '/:pathMatch(.*)*',
    component: async () => await import('@/views/NotFound.vue')
  })
}
export default createRouter({
  history: createWebHistory(),
  routes: routers
})
